<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMerchantsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('merchants', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('店铺名称');
            $table->string('company_name')->comment('公司名称');
            $table->decimal('tax_rate')->comment('税率')->default(0);
            $table->string('logo')->comment('店铺logo');
            $table->text('address')->comment('店铺发货地址');
            $table->string('mobile', 30)->comment('手机号码');
            $table->string('email', 50)->comment('邮箱');
            $table->string('qq', 30)->comment('qq');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('merchants');
    }
}
